<?php
// module/Album/view/album/album/index.phtml:

$title = $this->translate('My albums');
$this->headTitle($title);
?>
<h1><?php echo $this->escapeHtml($title); ?></h1>
<p>
    <a href="<?php echo $this->url('album', array('action' => 'add')); ?>">Add new album</a>
</p>

<table class="table">
    <tr>
        <th><?php echo $this->translate('Title') ?></th>
        <th><?php echo $this->translate('Artist') ?></th>
        <th>&nbsp;</th>
    </tr>
    <?php foreach ($albums as $album) : ?>
        <tr>
            <td><?php echo $this->escapeHtml($album->title); ?></td>
            <td><?php echo $this->escapeHtml($album->artist); ?></td>
            <td>
                <a href="<?php echo $this->url('album',
                                               ['action' => 'edit', 'id' => $album->id]); ?>">Edit</a>
                <a href="<?php echo $this->url('album',
                                               ['action' => 'delete', 'id' => $album->id]); ?>">Delete</a>
            </td>
        </tr>
    <?php endforeach; ?>
</table>